import { createMemoryHistory, createRouter } from 'vue-router'


const router = createRouter({
    mode: 'history',
    history: createMemoryHistory(),
    routes: [
        {
            path: '',
            redirect: 'home',
        },
        {
            path: '/',
            redirect: 'home',
        },
        {
            path: '/home',
            name: 'home',
            component: () => import('@/pages/Main/HomePage.vue'),
        },
        {
            path: '/emp',
            name: 'emp',
            component: () => import('@/pages/Main/emp.vue'),
        },
        {
            path: '/std',
            name: 'std',
            component: () => import('@/pages/Main/std.vue'),
        },
        {
            path: '/dept',
            name: 'dept',
            component: () => import('@/pages/Main/dept.vue'),
        },
        {
            path: '/class',
            name: 'class',
            component: () => import('@/pages/Main/class.vue'),
        },
        {
            path: '/course',
            name: 'course',
            component: () => import('@/pages/Main/course.vue'),
        },
        {
            path: '/schedule',
            name: 'schedule',
            component: () => import('@/pages/Main/schedule.vue'),
        },
        {
            path: '/score',
            name: 'score',
            component: () => import('@/pages/Main/score.vue'),
        },
    ]
})

router.afterEach((to, from) => {

    console.log(to.name);
    console.log(from.name);

})

export default router;